package com.example.mallorder.util;

import com.example.mallorder.constant.OrderConstant;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author guanglin.ma
 * @date 2024-01-18 18:49
 */
@RocketMQMessageListener(topic = OrderConstant.ROCKETMQ_ORDER_TOPIC,
        consumerGroup = "${rocketmq.consumer.group}")
@Component
public class OrderMsgConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("收到的消息："+message);
    }
}
